//垂直居中
@mixin textVerticalCenter($height) {
  height: $height;
  line-height: $height;
}

// 文字超出省略号
@mixin textEllipsis {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

//正方形
@mixin square($width) {
  position: relative;
  width: $width;
  &::before {
    position: relative;
    content: '';
    display: block;
    width: 100%;
    height: 0;
    padding-top: 100%;
  }
  &-inner {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 50%;
    left: 50%;
    margin-top: -$width/2;
    margin-left: -$width/2;
  }
}
